"""author: tlf
   data: 2020/11/9
   project: ldj
"""
import re

# while True:
#     print("想要退出请输入exit")
#     msg = input("请输入一个数：")
#     if msg == "exit":
#         break
#     else:
#         ret1 = re.findall(r"^\+?[1-9][0-9]*$", msg)
#         ret2 = re.findall(r"^\-{1}[1-9][0-9]*$", msg)
#         ret3 = re.findall(r"^\+?\-?[1-9][0-9]*\.[0-9]*$|^\+?\-?[0]\.[0-9]*$", msg)
#         if msg in ret1:
#             print(f"{msg}是正整数")
#             continue
#         elif msg in ret2:
#             print(f"{msg}是负整数")
#             continue
#         elif msg in ret3:
#             print(f"{msg}是浮点数")
#             continue
#         else:
#             print("这是什么东西？")


# print("密码验证系统")
# pd = input("请输入要验证的密码：")
# if len(pd)<8:
#     print("密码过短，要求8-10位！")
# if len(pd)>10:
#     print("密码过长，要求8-10位！")
# ret = re.findall(r"^\w{8,10}$",pd)
# if pd in ret:
#     print("密码验证通过！")
# else:
#     print("密码只能有字母数字下划线组成！")


# print("提取电话号码")
# msg = input("请输入一段包含电话号码的随便什么东西:")
# tel = re.search(r"^(\(\+86)?1\d{2}([ |\-]?\d{4}){2}$",msg)
# print(f"电话号码为:{tel.group()}")